# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-about-time
_pkgname=about-time
pkgver=4.2.2
pkgrel=1
pkgdesc='Easily measure timing and throughput of code blocks, with beautiful human friendly representations..'
arch=('any')
url='https://pypi.org/project/about-time/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9cac46db868c6812ca17673fd07172a593216cf1deb0984d4ee61180f30fb52217ed62864730bef660a1d77608db9ac438d5480c4c7c836840ff7099e79baf7a')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/licenses/$pkgname"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

